package gek.uni.diplom.integrate.wizard;

import gek.uni.diplom.integrate.wizard.page.NewTestDescFileWizardPage;

import org.eclipse.core.resources.IFile;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

public class NewTestDescFileWizard extends Wizard implements INewWizard {

  private IStructuredSelection selection;
  private NewTestDescFileWizardPage newFileWizardPage;
  private IWorkbench workbench;

  @Override
  public void addPages() {
    newFileWizardPage = new NewTestDescFileWizardPage("createTestDescPage",
        selection);
    
    addPage(newFileWizardPage);
  }

  @Override
  public boolean performFinish() {
     
      IFile file = newFileWizardPage.createNewFile();
      if (file != null)
          return true;
      else
          return false;
  }

  public void init(IWorkbench workbench, IStructuredSelection selection) {
      this.workbench = workbench;
      this.selection = selection;
  }

}
